package com.example.tests;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.*;
import java.util.Random;

import org.testng.annotations.Test;

import com.example.fw.Folders;

public class TestFolderDelete extends TestBase {
	
	@Test
	public void testFolderDelete() {
		
		Folders oldFolders = app.getFolderHelper().getFolders();
		
		
		Random rnd = new Random();
		int index = rnd.nextInt(oldFolders.size() - 1);
		
		
	
		app.getFolderHelper().deleteFolder(index);
		Folders newFolders = app.getFolderHelper().getFolders();
	
		assertThat(newFolders.size(), equalTo(oldFolders.size()-1));
	
	}

}
